package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class DiscoverSingleRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/Load_DiariesCommentInfoByID";

    private String diaryId;

    public DiscoverSingleRequest(String diaryId) {
        this.diaryId = diaryId;
    }

    public String getDiaryId() {
        return diaryId;
    }

    public void setDiaryId(String diaryId) {
        this.diaryId = diaryId;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        DiscoverSingleRequestBody singleRequestBody = new DiscoverSingleRequestBody();
        singleRequestBody.setDiaryId(diaryId);
        singleRequestBody.setPhone(getPhone());
        singleRequestBody.setToken(getToken());
        return singleRequestBody;
    }

    private class DiscoverSingleRequestBody extends BaseTokenRequestBody {

        public String getDiaryId() {
            return diaryId;
        }

        public void setDiaryId(String diaryId) {
            this.diaryId = diaryId;
        }

        @SerializedName("DiaryID")
        private String diaryId;

        private DiscoverSingleRequestBody() {
            setSv(BaseRequestConfig.SV_GET_SINGLE_DISCOVER);
        }
    }
}
